#ifndef _H_ABSTRACTSLIDEBAR
#define _H_ABSTRACTSLIDEBAR

enum sBar_type{
    sBar_horizontal,
    sBar_vertical
};

#include "winElmt.h"

class abstractSlideBar;

class abstractBarCursor: public winElmt{

    protected:
        abstractSlideBar* parentBar;

    public:
        abstractBarCursor(abstractSlideBar*);
        abstractBarCursor(abstractSlideBar*,window*);
        virtual ~abstractBarCursor();

        void getOffset(int*,int*);

        void setPosition(int);
        virtual void draggingEvent(int,int);
};

class abstractSlideBar: public winElmt{

    protected:
        sBar_type type;

        long hiVal;
        long loVal;

        long value;

        abstractBarCursor* cursor;

        void setCursor(abstractBarCursor*);

    public:
        abstractSlideBar(sBar_type);
        abstractSlideBar(sBar_type,window*);
        virtual ~abstractSlideBar();

        winElmt* getCursorElem();

        unsigned char getType();

        void setBounds(long,long);
        void getBounds(long*,long*);
        void setValue(long);
        long getValue();
        float getPosition();

        virtual void mouseClickEvent(int);

        virtual void barChangeValueEvent();
        virtual unsigned char eventExec(unsigned char);
};

#endif
